# pid 进程号
from threading import Thread
import os

def task():
    print(f'子线程: {os.getpid()}')



if __name__ == '__main__':
    t = Thread(target=task,)
    t.start()

    print(f'主线程: {os.getpid()}')